home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-03 | 10.6 KB | 352 lines | [ttro/ttxt] |
- A List of all Primitives in the Little Smalltalk System
- ==================================================
-
-
- (Includes Macintosh Enhanced User Interface extensions)
-
-
- Primitives with no parameters
-
- 1: <non-existent>
- 2: count of objects
- 3: return a random number
- 4: return time in seconds
- 5: flip watch
- 9: quit program
-
- Primitives with one parameter
-
- 11: class of object
- 12: basic size of object
- 13: hash value of object
- 14: debugging print
- 18: change return point - block return
- 19: process execute
-
- Primitives with 2 parameters
-
- 20: make object 1 'become' object 2 and vice-versa
- 21: object identity test
- 22: set class of object
- 23: debugging stuff
- 24: string cat
- 25: basicAt:
- 26: byteAt:
- 27: symbol set
- 28: block start
- 29: duplicate a block, adding a new context to it
-
- Primitives with 3 parameters
-
- 31: basicAt:Put:
- 32: basicAt:Put: for bytes
- 33: string copyFrom:to:
- 39: compile method
-
- Integer primitives with one parameter
-
- 41: float equiv of integer
- 42: print - for debugging purposes
- 43: set time slice - done in interpreter
- 45: set random number
- 48: allocate object
- 49: allocate byte array
-
- Integer primitives with two parameters
-
- 50: addition
- 51: subtraction
- 52: <
- 53: >
- 54: <=
- 55: >=
- 56: 73: ==
- 57: !=
- 58: multiplication
- 59: quo:
- 70: rem:
- 71: &=
- 72: ^=
- 79: >>= , <<=
-
- String primitives with one parameter
-
- 81: length of string
- 82: hash value of symbol
- 83: string as symbol
- 87: value of symbol
- 88: System () call (if available)
- 89: fatal error
-
- Floating point primitives with one parameter
-
- 101: floating value asString
- 102: log
- 103: exp
- 106: integer part
- return two integers n and m such that
- number can be written as n * 2** m
-
- Floating point primitives with two parameters
-
- 110: +
- 111: -
- 112: <
- 113: >
- 114: <=
- 115: >=
- 116: ==
- 117: !=
- 118: *
- 119: /
-
-
- Primitives 120 - 149 are file-related operations.
-
- 120: Open file. Param 1 = file name
- Param 2 = open mode
- Param 3 = file type
- 121: Close file
- 122: Return file size (not implemented)
- 123: Interpret a text file as Little Smalltalk source.
- 124: Delete file
- 125: Get string (not applicable to Macintosh implementation)
- 127: Write an object image.
- 128: Print a string without adding a carriage return.
- (not applicable to Macintosh implementation)
- 129: Print a string with a carriage return.
- (not applicable to Macintosh implementation)
-
- Primitives 160 and above are system-specific.
- The following are for the Macintosh Symantec(TM) C / TCL implementation.
-
- 160: Open different types of window
- Param 1 = window number
- Param 2 = action
- Param 3 = window title
- Param 4 = window type (0 - graphics, 1 - text, 2 - select).
- Action 1: Open a window to a system decided size and location
- Action 2: Open a window to specified size and loaction where:
- Param 5 = left co-ordinate
- Param 6 = top co-ordinate
- Param 7 = width
- Param 8 = height
- 161: Perform a variety of simple window actions
- Param 1 = window number
- Param 2 = action
- Action 1: close window
- Action 2,3: no longer used
- Action 4: activate window
- Action 5: refresh the text in window (no longer used)
- Action 6: return the window's current size
- Action 7: return the window's position in global co-ordinates
- Action 8: bring window to front
- Action 9: query the 'dirty' status of the window (i.e. does any text need to be saved)
- Action 10: set the window's title
-
- 162: Primitives requiring a single integer parameter
- Param 1 = window number
- Param 2 = action
- Param 3 = menu pointer or timer setting
- Action 1: set timer (not implemented)
- Action 2: attach a menu to a window
- Action 3: detach a menu from a window
-
- 163: Primitives requiring two integer parameters
- Param 1 = window number
- Param 2 = action
- Param 3 = 'x' value
- Param 4 = 'y' value
- Action 1: (not used)
- Action 2: set window size
- Action 3: set window origin (not implemented)
-
- 164: Cursors (mouse pointers)
- Param 1 = action
- Action 1: fetch a named cursor (either system standard or from resource fork)
- Param 2 = string containing name of cursor to fetch
- Returns: string containing a pointer to the cursor.
- Action 2: show cursor
- Param 2 = cursor pointer (as returned by Action 1)
- Action 3: reset to default cursor (arrow)
-
- 165: Text-related functions
- Param 1 = pane pointer
- Param 2 = action
- Action 1: return all the text in the text pane
- Action 2: return all the text in the currently selected area
- of the text pane
- Action 3: replace all the text in the text pane with the specified text
- Param 3 = replacing text
- Action 4: delete all text in a pane
- Action 5: change the pane's font to the named font
- Param 3 = string representing name of new font
- Action 6: change the point size of all text in the pane
- Param 3 = new point size
- Action 7: change the face of all text in the pane
- Param 3 = new type face
- Action 8: set the text selection to the given range
- Param 3 = start of range
- Param 4 = end of range
- Action 9: return the start and end positions of a selection in character
- positions, relative to the start of the text.
- Action 10: scroll the text so that the current selection is visible
-
- 166: insert text at the current cursor position
- Param 1 = pane pointer
- Param 2 = string to insert
-
- 167: return a rectangle representing the maximum available screen area in
- global co-ordinates.
-
- 168: window pane related functions
- Param 1 = action
- Param 2 = window number / pane pointer
- Action 1: create a pane and attach it to the specified window
- Param 3 = pane type (1 - text, 2 - select, 3 - graphics)
- Params 4-7 = left, top, right, bottom of pane
- Params 8-9 = horizontal, vertical sizing options
- returns a string containing a pointer to the newly created pane
- Action 2: return a point representing the current size of the pane
- Action 3: draw the contents of a text pane, ignore for graphics panes.
- Action 4: direct all further drawing operations to this pane
- Action 5: notify the system that drawing is complete (not needed)
-
- 170: getevent: format and return the next interface event
-
- 171: event information returned as an integer
- Param 1 = action
- Action 1: return the number of the window in which the event occurred
- Action 2: return the number of the selected menu
- Action 3: return the number of the selected menu item
- Action 4: return the most recent character typed by the user
- Action 5: return the mouse's 'y' position (not used)
- Action 6: return the number of the mouse button pressed
- Action 7: return the number of mouse clicks
- Action 8: return the most recent character typed by the user
- Action 9: return the number of the command (menu shortcut) typed.
-
- 172: more general event information
- Param 1 = action
- Action 1: return a point showing where a mouse button was pressed
-
- 180: add a new menu
- Param 1 = menu number
- Param 2 = menu title
- Param 3 = pop-up menu indicator
- returns a string containing a pointer to the menu.
-
- 181: add a menu item to the end of a menu
- Param 1 = menu pointer
- Param 2 = item text
- Param 3 = optional short-cut character
-
- 182: enable/disable, check/uncheck menu items
- Param 1 = menu pointer
- Param 2 = item number
- Param 3 = action
- Param 4 = flag
- Action 1: enable or disable a menu item
- Action 2: check or uncheck a menu item
-
- 183: select from a pop-up menu
- Param 1 = menu pointer
- Param 2 = position at which top of menu is to appear
- Param 3 = position at which left side of menu is to appear
- Returns: an integer indicating which item was selected
-
- 184: menu/menu item disposal
- Param 1 = menu pointer
- Param 2 = action
- Action 1: dispose of a menu
- Action 2: remove a menu item
- Param 3 = item number
-
- 190: print a string at the given pixel position
- Param 1 = x location
- Param 2 = y location
- Param 3 = string to print
-
- 192: point-related functions
- Param 1 = action
- Param 2 = x value
- Param 3 = y value
- Action 1: draw a line from the current position to the given point
- Action 2: move to the given point
- Action 3: draw a pixel at the given point
-
- 193: circles and miscellaneous graphics functions
- Param 1 = action
- Params 2, 3 = co-ordinates for character / centre of circle
- Param 4 = character to draw / radius of circle
- Action 1: draw circle
- Action 2: draw a single character
-
- 194: rectangle-related functions
- Param 1 = action
- Params 2-5 = left, top, right, bottom of rectangle
- Action 1: frame a rectangle
- Action 2: paint a rectangle with the current pattern
- Action 3: erase a rectangle
- Action 4: invert a rectangle
-
- 195: shade a rectangle
- (now ignores rectangle and sets shading for all subsequent drawing
- operations for added flexibility)
- Param 1 = action
- Params 2-5 = left, top, right, bottom of rectangle (ignored)
- Param 6 = percentage of shading to apply (rounded to coincide with
- Apple-defined constants)
- Action 1: set shading percentage
-
- 200: show a message in an Alert window
- Param 1 = string to display
-
- 201: prompt for a string to be entered by the user
- Param 1 = prompting string
- Param 2 = reply string
-
- 202: display a prompt requiring a yes/no/cancel response
- Param 1 = prompting string
- Param 2 = number of button to highlight (ignored)
- Returns: true if 'yes' is clicked, otherwise false.
-
- 203: prompt for a file name - allows the specification of
- a file type to mask unwanted files and will return a fully qualified
- file name or nil if none is selected or 'cancel' is clicked.
- Param 1 = prompting string (e.g. 'System image:')
- Param 2 = default file name
- Param 3 = flag indicating whether to use a 'save' or an 'open' dialog
- Param 4 = file type to mask for
-
- 204: display an error message
- Param 1 = string to display
-
- 205: beep the system beeper
-
- 206: save/load text pane contents
- Param 1 = pane pointer
- Param 2 = action
- Param 3 = file number (file must be open)
- Action 0: load text
- Action 1: save text
-
- 207: return a fully qualified file name after receipt of an
- Open Document event with Smalltalk file type prepended.
- (Used for drag'n'drop support).
-
- 210: date and time functions
- Param 1 = action
- Action 1: return the current date and time as a string
- Action 2: return the current day of the week as a number
- Action 3: return the current day of the month as a number
- Action 4: return the current month number
- Action 5: return the current year
-
- 254: return version string from 'vers' resource.
-
- 255: set debug
- Param 1 = action
- Action 1: switch on debugging messages
- Action 2: turn off debugging messages
-